﻿@model Project.Database.Blog

@{
    ViewBag.Title = "Show";
}

<h2>Show</h2>

<fieldset>
    <legend>Blog</legend>

    <div class="display-label">Name</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Name)
    </div>

    <div class="display-label">URL</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.URL)
    </div>

    <div class="display-label">Keywords</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Keywords)
    </div>

    <div class="display-label">Timestamp</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Timestamp)
    </div>

    <div class="display-label">CategoryID</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.CategoryID)
    </div>

    <div class="display-label">ThumbURL</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ThumbURL)
    </div>
    <ul>
    @{
        int i = 0;
        foreach (Project.Database.Advert advert in Model.Adverts)
        {
        <li>Name: @advert.Name</li>
        <li>Path: @advert.URL</li>
        <li>Brand: @advert.Advertiser.BrandName</li>
        <li>
            <img src= "@Url.Content(advert.URL)" alt="Advert Image" width="200" height="100" />
        </li>
        <li>Html: @ViewBag.AdHtml[i++]</li>
        }
    }
    </ul>

</fieldset>
<p>
    @Html.ActionLink("Back to List", "Index", "Profile")
</p>
